Questions and Answers
Copyright (c) 1992 Apple Users' Group, Sydney
Republished from Applecations, a publication of the Apple Users' Group, Sydney, Australia.
Do you have an Apple computer question that you would like an answer to? If we can't help you, we'll find somebody who can. Send written questions to the appropriate editor.
Q: My menus are behaving oddly when programmed with TML Pascal. The Apple menu works fine: the first time I pull it down, it draws each item, and thereafter when I select the Apple menu it pulls down quickly. My other menus, however, don't seem to be being cached. It looks like each item is being redrawn every time I pull down the menu.
A: You shouldn't have to do anything special to have your menus cached. If you're creating them with NewMenu2, you might not have set the cacheable flag bit. If you're using NewMenu and passing a string, you should be fine already.
My bet is you're repeatedly enabling or disabling some items while the program is idling. This nukes the cache all the time. You can use GetMItemFlag to check the current state of an item, and then use EnableMItem or DisableMItem only if the item is not already in the correct state. That way you don't cause the Menu Manager to throw out the cached copy of your menu unnecessarily.
David Lyons
Source: Internet
Q: If the user clicks in the window (changing the position of the selection cursor) while an update event is pending, bad things happen (e.g. I redraw the cursor, but if its old position isn't part of the update region I end up with two cursors [not mouse cursors!] in the window, which is obviously messy). Does anyone know of a way around this?
A: Yes - don't draw in your window outside of your window's update routine. If you move the cursor from one place to another, you should invalidate the place where the cursor used to be, and invalidate the place where it should be. When you get your next update event, your redraw routine should know where the cursor's supposed to be now and draw things correctly.
If you want to draw in your window outside of your update routines, make sure you don't wind up drawing something that your update routine will draw differently, and make sure you set up the Window Manager environment properly.
Matt Deatherage
Source: Internet
Q: Any opinion as to who has the better programming documentation package for System 6.0? Both Apple and ByteWorks have published somewhat expensive packages.
A: The Programmer's Reference For System 6.0 available from ByteWorks is the official programmer documentation for System 6.0. It supersedes the ERSs releases on the System 6.0 CD. When there are discrepancies between the two, believe the Programmer's Reference.
The ByteWorks documentation started with the ERSs from the CD. Then Mike Westerfield edited it, and Apple people reviewed his drafts and made extensive comments that he integrated into the finished product. Along the way lots of clarifications and some corrections were made.
If you're writing software for System 6.0, the programmer's reference is a must-have. You can indeed think of it as Volume 4 of the GS Toolbox Reference, but it covers much more than the toolbox.
Source: Internet
Q: What's wrong with AppleWorks 3.0's built-in spelling checker? I've just been told that my file has 65535 misspelled words.
A: This problem is caused by the occurrence of duplicate words in the user's custom dictionary. The solution is to load the Cust.Dictionary in to the AppleWorks database, as a database file with only a single category. Alphabetise your list, eliminate the duplicates and save Cust.Dictionary back to the same subdirectory that it came from.
Most of the duplicates will be compound works with embedded capitals e.g "AppleWorks" and "HyperStudio". Apparently AppleWorks 3.0's spell checker has trouble with these.
Beverly Cadieux
Kingwood Software
Source: Apples B.C. News, July 1992

THIS CONTENT COPYRIGHT © 2007, APPLE MACINTOSH USERS' GROUP, SYDNEY
Permission has been obtained to make this material available on the Internet.

Permission is hereby granted for non-profit user groups to republish this content.
PLEASE CREDIT THE AUTHOR AND THE SOURCE: Applecations, publication of the Apple Users' Group, Sydney, Australia

THIS PAGE COPYRIGHT © 2007, ANDREW ROUGHAN